Conversation
…kage Replace the internal `static/app/utils/sqlish/` module (parser, formatter, PEG grammar, and supporting utilities) with the extracted `@sentry/sqlish` npm package. A thin wrapper at `static/app/utils/sqlish.tsx` preserves the same class API and adds Sentry observability (performance spans and error capture with fingerprinting on parse failures). Add `@sentry/sqlish` to Jest's ESM_NODE_MODULES allowlist and moduleNameMapper for ESM-only package resolution. Co-Authored-By: Claude <noreply@anthropic.com>
…tter Wrap BaseSQLishFormatter via composition rather than extending it. Remove unused SQLishParser and Token re-exports. Co-Authored-By: Claude <noreply@anthropic.com>
evanpurkhiser
approved these changes
Apr 2, 2026
scttcper
reviewed
Apr 2, 2026
Comment on lines
+311
to
+313
| // @sentry/sqlish uses ESM exports which Jest can't resolve directly | ||
| '^@sentry/sqlish/react$': '<rootDir>/node_modules/@sentry/sqlish/dist/react.js', | ||
| '^@sentry/sqlish$': '<rootDir>/node_modules/@sentry/sqlish/dist/index.js', |
Member
There was a problem hiding this comment.
shouldn't the ESM_NODE_MODULES be enough
Member
Author
There was a problem hiding this comment.
Unfortunately not, ESM_NODE_MODULES looks like it fixes the transformation step, but the path config actually allows Jest to resolve the import
…comment Move sentrySpan.end() to a finally block to prevent span leaks on parse errors. Clarify moduleNameMapper comment explaining why the manual paths are needed (ESM-only exports with no require condition). Co-Authored-By: Claude <noreply@anthropic.com>
george-sentry
pushed a commit
that referenced
this pull request
Apr 9, 2026
…112147) Replaces the internal `sqlish` module with the `@sentry/sqlish` npm package which we published recently. No fuss, no muss, it's all the same code. Added a little wrapper around it, since that's good practice and a good place to keep having telemetry. Took this moment to add a sprinkle of tests to make sure things are working. I waffled on whether to add a CJS export to `sqlish` but decided that it's not worth it. You tell me though, it's easy to add. --------- Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the internal
sqlishmodule with the@sentry/sqlishnpm package which we published recently. No fuss, no muss, it's all the same code. Added a little wrapper around it, since that's good practice and a good place to keep having telemetry. Took this moment to add a sprinkle of tests to make sure things are working.I waffled on whether to add a CJS export to
sqlishbut decided that it's not worth it. You tell me though, it's easy to add.